package org.bapoint.api.user.feign;


import org.bapoint.common.response.ServerResponseEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "ba-wireless-progress-user-center",contextId = "user")
public interface OrderFeignClient extends WarmUpFeignClient{

    @GetMapping("/api/health")
    @Override
    default String warmUp() {
        return "OK";
    }

    /**
     * 如果订单没有被取消的话，获取订单金额，否之会获取失败
     *
     * @param orderIds 订单id列表
     * @return 订单金额
     */
    @GetMapping(value =  "/insider/ordgetOrdersAmountAndIfNoCanceler")
    ServerResponseEntity<Object> getOrdersAmountAndIfNoCancel(@RequestParam("orderIds") List<Long> orderIds);
}
